package com.rustic.server.vo.list;

import cn.hutool.core.bean.BeanUtil;
import cn.xy.base.server.po.SysAdmin;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.rustic.server.po.RusticAdmin;

import java.util.Date;

/**
 * 表[rustic_admin]对应VO类
 *
 * @author auto
 */

@Data
public class RusticAdminAdminListVO {

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID", dataType = "int")
    private int id;

    /**
     * 用户账号
     */
    @ApiModelProperty(value = "用户账号", dataType = "String")
    private String username;

    /**
     * 用户昵称
     */
    @ApiModelProperty(value = "用户昵称", dataType = "String")
    private String nickname;

    /**
     * 头像地址
     */
    @ApiModelProperty(value = "头像地址", dataType = "String")
    private String avatar;

    /**
     * 手机号码
     */
    @ApiModelProperty(value = "手机号码", dataType = "String")
    private String mobile;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注", dataType = "String")
    private String remark;

    /**
     * 最后登陆IP
     */
    @ApiModelProperty(value = "最后登陆IP", dataType = "String")
    private String loginIp;

    /**
     * 最后登陆时间
     */
    @ApiModelProperty(value = "最后登陆时间", dataType = "Date")
    private Date loginDate;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", dataType = "Date")
    private Date createTime;

    /**
     * 在当前乡村的Id
     */
    @ApiModelProperty(value = "在当前乡村的Id", dataType = "int")
    private int rusticId;

    /**
     * 在当前乡村的roleId
     */
    @ApiModelProperty(value = "在当前乡村的roleId", dataType = "int")
    private int roleId;

    /**
     * 在当前乡村的角色名称
     */
    @ApiModelProperty(value = "在当前乡村的角色名称", dataType = "String")
    private String roleName;

    public RusticAdminAdminListVO(SysAdmin sysAdmin) {
        if (sysAdmin != null) {
            BeanUtil.copyProperties(sysAdmin, this);
        }
    }
}
